<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
</head>
<body>

<div  th:if="${user}">
    <h2 th:text="${user.id}"/>
    <h2 th:text="${user.name}"/>
    <h2 th:text="${user.age}"/>
</div>
</body>
</html>